print("spliting dataset")
from util.dir import sort_glob,mkdir_if_not_exist
import shutil
out_path = r'./data_h5'
test='./test'
train='./train'
mkdir_if_not_exist(test)
mkdir_if_not_exist(train)
files=sort_glob(f"{out_path}/*.h5")
for i in files[0:int(len(files)*0.8)]:
    shutil.copy(i,train)

for i in files[int(len(files)*0.8):]:
    shutil.copy(i,test)
